/*
 * @Author: humengchuan 531537052@qq.com
 * @Date: 2025-04-20 12:49:40
 * @LastEditors: humengchuan 531537052@qq.com
 * @LastEditTime: 2025-04-20 13:45:14
 * @FilePath: \projecte:\学习\react\react-optimize-ts\src\components\beeGird.tsx
 * @Description: 
 */
import React from 'react'
import styles from './beeGird.module.scss'


const generateBeeLists = (): React.ReactNode[] => {
    const rows = Array(4).fill(''); // 行数
    const cols = Array(8).fill(''); // 列数
    const beeLists: React.ReactNode[] = [];

    for (let i = 0; i < rows.length; i++) {
        const lineItems: React.ReactNode[] = [];
        for (let j = 0; j < cols.length; j++) {
            lineItems.push(<div key={`${i}-${j}`} className={styles.item}></div>);
        }
        beeLists.push(
            <div key={i} className={styles.line}>
                {lineItems}
            </div>
        );
    }

    return beeLists;
}
export default function BeeGird() {

    const beeLists = generateBeeLists(); // 调用生成函数

    return (

        <div className={styles.container}>
            {beeLists}
        </div>
    )
}
